Index: /issm/trunk/src/m/classes/public/ProcessPatch.m
===================================================================
--- /issm/trunk/src/m/classes/public/ProcessPatch.m	(revision 4275)
+++ /issm/trunk/src/m/classes/public/ProcessPatch.m	(revision 4276)
@@ -7,22 +7,33 @@
 %Get number of fields;
 fields=unique(Patch(:,1));
+steps=unique(Patch(:,2));
 
-%parse fields
-for i=1:length(fields),
+%parse steps
+for j=1:length(steps),
 
-	%get name
-	fieldname=EnumAsString(fields(i));
+	posstep=find(Patch(:,2)==steps(j));
+	
+	%Take all the lines of the Patch for this timestep
+	temporarypatch=Patch(posstep,:);
+	time=temporarypatch(1,3);
+	step=temporarypatch(1,2);
 
-	%get line positions
-	pos=find(Patch(:,1)==fields(i));
+	%parse fields
+	for i=1:length(fields),
 
-	%Fill Result structure
-	%structure(step).(fieldname).steps=Patch(pos,2);
-	%structure(step).(fieldname).time=Patch(pos,3);
-	structure(step).(fieldname).element=Patch(pos,4);
-	structure(step).(fieldname).interpolation=Patch(pos,5);
-	structure(step).(fieldname).index=Patch(pos,6:8);
-	structure(step).(fieldname).value=Patch(pos,9:end);
+		%get name
+		fieldname=EnumAsString(fields(i));
 
+		%get line positions
+		pos=find(temporarypatch(:,1)==fields(i));
+
+		%Fill Result structure
+		structure(step).(fieldname).steps=step;
+		structure(step).(fieldname).time=time;
+		structure(step).(fieldname).element=temporarypatch(pos,4);
+		structure(step).(fieldname).interpolation=temporarypatch(pos,5);
+		structure(step).(fieldname).index=temporarypatch(pos,6:8);
+		structure(step).(fieldname).value=temporarypatch(pos,9:end);
+
+	end
 end
-
Index: /issm/trunk/src/m/classes/public/parseresultsfromdisk.m
===================================================================
--- /issm/trunk/src/m/classes/public/parseresultsfromdisk.m	(revision 4275)
+++ /issm/trunk/src/m/classes/public/parseresultsfromdisk.m	(revision 4276)
@@ -16,12 +16,11 @@
 while ~isempty(result),
 
-	%Get time and step
-	results(result.step).step=result.step;
-	results(result.step).time=result.time;
-
 	%process patch if necessary
 	if strcmpi(result.fieldname,'Patch'),
 		results=ProcessPatch(results,result.step,result.field);
 	else
+		%Get time and step
+		results(result.step).step=result.step;
+		results(result.step).time=result.time; 
 		results(result.step).(result.fieldname)=result.field;
 	end
