Index: /issm/trunk/src/m/classes/public/modelextract.m
===================================================================
--- /issm/trunk/src/m/classes/public/modelextract.m	(revision 5450)
+++ /issm/trunk/src/m/classes/public/modelextract.m	(revision 5451)
@@ -160,8 +160,11 @@
 		pos=find(md2.edges(:,4)==0);
 		md2.edges(pos,4)=NaN;
-		%Invert NaN of the third column with last column
+		%Invert NaN of the third column with last column (Also invert first two columns!!)
 		pos=find(isnan(md2.edges(:,3)));
 		md2.edges(pos,3)=md2.edges(pos,4);
 		md2.edges(pos,4)=NaN;
+		values=md2.edges(pos,2);
+		md2.edges(pos,2)=md2.edges(pos,1);
+		md2.edges(pos,1)=values;
 		%Finally remove edges that do not belong to any element
 		pos=find(isnan(md2.edges(:,3)) & isnan(md2.edges(:,4)));
