Index: /issm/trunk/src/m/classes/public/collapse.m
===================================================================
--- /issm/trunk/src/m/classes/public/collapse.m	(revision 2688)
+++ /issm/trunk/src/m/classes/public/collapse.m	(revision 2689)
@@ -51,7 +51,6 @@
 if ~isnan(md.elements_type2d)
 	md.elements_type=md.elements_type2d; 
-else
-	md.elements_type2d(:,1)=project2d(md,md.elements_type(:,1),1);
-	md.elements_type2d(:,2)=project2d(md,md.elements_type(:,2),1);
+elseif ~isnan(md.elements_type)
+	md.elements_type=project2d(md,md.elements_type,1);
 end	
 md.gridonhutter=project2d(md,md.gridonhutter,1);
Index: /issm/trunk/src/m/classes/public/solveparallel.m
===================================================================
--- /issm/trunk/src/m/classes/public/solveparallel.m	(revision 2688)
+++ /issm/trunk/src/m/classes/public/solveparallel.m	(revision 2689)
@@ -26,5 +26,5 @@
 
 %Do we return, or just wait for results?
-if md.waitonlock~=0,
+if md.waitonlock~=0 &  ~strcmpi(options.batch,'yes'),
 	%we wait for the done file
 	islock=waitonlock(md,executionpath);
