Index: /issm/trunk/src/c/ModelProcessorx/Balancedthickness/CreateConstraintsBalancedthickness.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/Balancedthickness/CreateConstraintsBalancedthickness.cpp	(revision 3441)
+++ /issm/trunk/src/c/ModelProcessorx/Balancedthickness/CreateConstraintsBalancedthickness.cpp	(revision 3442)
@@ -16,8 +16,5 @@
 	int i;
 	int count=0;
-	
 	DataSet* constraints = NULL;
-	Spc*    spc  = NULL;
-	int     node1,node2;
 
 	/*Create constraints: */
@@ -30,27 +27,16 @@
 	/*Create spcs from x,y,z, as well as the spc values on those spcs: */
 	for (i=0;i<iomodel->numberofvertices;i++){
-	#ifdef _PARALLEL_
-	/*keep only this partition's nodes:*/
-	if((iomodel->my_grids[i]==1)){
-	#endif
+		if(iomodel->my_vertices[i]){
+			
+			if ((int)iomodel->spcthickness[2*i]){
+		
+				constraints->AddObject(new Spc(count,i+1,1,*(iomodel->spcthickness+2*i+1)));//we enforce first translation degree of freedom, for temperature
+				count++;
+			}
+		}
+	}
 
-		if ((int)spcthickness[2*i]){
-	
-			/*This grid needs to be spc'd: */
-
-			spc_sid=count;
-			spc_node=i+1;
-			spc_dof=1; //we enforce first translation degree of freedom, for temperature
-			spc_value=*(spcthickness+2*i+1);
-
-			spc = new Spc(spc_sid,spc_node,spc_dof,spc_value);
-			constraints->AddObject(spc);
-			count++;
-		}
-
-	#ifdef _PARALLEL_
-	} //if((my_grids[i]==1))
-	#endif
-	}
+	/*Free data: */
+	xfree((void**)&iomodel->spcthickness);
 
 	/*All our datasets are already order by ids. Set presort flag so that later on, when sorting is requested on these 
@@ -58,7 +44,4 @@
 	constraints->Presort();
 
-	/*Free data: */
-	xfree((void**)&spcthickness);
-	
 	cleanup_and_return:
 	
Index: /issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateLoadsDiagnosticStokes.cpp
===================================================================
--- /issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateLoadsDiagnosticStokes.cpp	(revision 3441)
+++ /issm/trunk/src/c/ModelProcessorx/DiagnosticStokes/CreateLoadsDiagnosticStokes.cpp	(revision 3442)
@@ -14,4 +14,6 @@
 
 
+	int i;
+	
 	DataSet*    loads    = NULL;
 	Icefront*   icefront = NULL;
Index: /issm/trunk/src/c/objects/Node.cpp
===================================================================
--- /issm/trunk/src/c/objects/Node.cpp	(revision 3441)
+++ /issm/trunk/src/c/objects/Node.cpp	(revision 3442)
@@ -135,6 +135,6 @@
 		/*On a 3d mesh, we may have collapsed elements, hence dead grids. Freeze them out: */
 		if (!iomodel->gridonbed[i]){
-			for(k=1;k<=node_numdofs;k++){
-				node->FreezeDof(k);
+			for(k=1;k<=numdofs;k++){
+				this->FreezeDof(k);
 			}
 		}
