Index: /issm/trunk/src/m/classes/public/ProcessPatch.m
===================================================================
--- /issm/trunk/src/m/classes/public/ProcessPatch.m	(revision 4318)
+++ /issm/trunk/src/m/classes/public/ProcessPatch.m	(revision 4319)
@@ -1,7 +1,15 @@
-function structure=ProcessPatch(structure,step,Patch);
+function structure=ProcessPatch(structure);
 %PROCESSPATCH - create a structure from a patch
 %
 %   Usage:
-%      Result=ProcessPatch(Patch);
+%      Result=ProcessPatch(Result);
+
+%Get out if no Patch
+if (~isfield(structure,'Patch')),
+	return;
+else
+	Patch=structure(1).Patch;
+	numvertices=structure(1).PatchVertices;
+end
 
 %Get number of fields;
@@ -33,7 +41,12 @@
 		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);
+		structure(step).(fieldname).index=temporarypatch(pos,6:5+numvertices);
+		structure(step).(fieldname).value=temporarypatch(pos,6+numvertices:end);
 
 	end
 end
+
+%remove fields
+structure=rmfield(structure,'Patch');
+structure=rmfield(structure,'PatchVertices');
+structure=rmfield(structure,'PatchNodes');
Index: /issm/trunk/src/m/classes/public/parseresultsfromdisk.m
===================================================================
--- /issm/trunk/src/m/classes/public/parseresultsfromdisk.m	(revision 4318)
+++ /issm/trunk/src/m/classes/public/parseresultsfromdisk.m	(revision 4319)
@@ -16,13 +16,10 @@
 while ~isempty(result),
 
-	%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
+	%Get time and step
+	results(result.step).step=result.step;
+	results(result.step).time=result.time; 
+
+	%Add result
+	results(result.step).(result.fieldname)=result.field;
 
 	%read next result
@@ -31,3 +28,6 @@
 end
 
+%process patch if necessary
+results=ProcessPatch(results);
+
 fclose(fid);
