Index: /issm/trunk/src/m/classes/public/setelementstype.m
===================================================================
--- /issm/trunk/src/m/classes/public/setelementstype.m	(revision 5533)
+++ /issm/trunk/src/m/classes/public/setelementstype.m	(revision 5534)
@@ -136,5 +136,5 @@
 	commonelements=sum(matrixelements,2)~=0;
 	commonelements(find(pattynflag))=0; %only one layer: the elements previously in macayeal
-	macayealflag(find(commonelements))=1; %these elements are now macayealpattynelements
+	macayealflag(find(commonelements))=0; %these elements are now macayealpattynelements
 	macayealpattynflag=zeros(md.numberofelements,1);
 	macayealpattynflag(find(commonelements))=1;
@@ -147,5 +147,4 @@
 
 	%Now recreate gridonmacayeal and gridonmacayealpattyn
-	gridonmacayeal(md.elements(find(macayealflag),:))=1;
 	gridonmacayealpattyn(md.elements(find(macayealpattynflag),:))=1;
 end
