Index: /issm/trunk/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 7372)
+++ /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 7373)
@@ -640,4 +640,7 @@
 	ElementMatrix* Ke=new ElementMatrix(Ke1,Ke2);
 	
+	/*clean-up and return*/
+	delete Ke1;
+	delete Ke2;
 	return Ke;
 }
@@ -783,6 +786,4 @@
 
 	/*Initialize Element matrix and return if necessary*/
-	if(IsOnWater()) return NULL;
-
 	ElementMatrix* Ke1=new ElementMatrix(pentabase->nodes,NUMVERTICES,this->parameters,MacAyealApproximationEnum);
 	ElementMatrix* Ke2=new ElementMatrix(this->nodes     ,NUMVERTICES,this->parameters,StokesApproximationEnum);
@@ -1243,5 +1244,4 @@
 /*FUNCTION Penta::CreateKMatrixDiagnosticPattyn{{{1*/
 ElementMatrix* Penta::CreateKMatrixDiagnosticPattyn(void){
-	
 
 	/*compute all stiffness matrices for this element*/
@@ -1253,5 +1253,4 @@
 	delete Ke1;
 	delete Ke2;
-
 	return Ke;
 
@@ -1520,5 +1519,4 @@
 ElementMatrix* Penta::CreateKMatrixDiagnosticVert(void){
 	
-
 	/*compute all stiffness matrices for this element*/
 	ElementMatrix* Ke1=CreateKMatrixDiagnosticVertVolume();
Index: /issm/trunk/src/c/objects/Elements/Tria.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 7372)
+++ /issm/trunk/src/c/objects/Elements/Tria.cpp	(revision 7373)
@@ -758,5 +758,4 @@
 ElementMatrix* Tria::CreateKMatrixDiagnosticMacAyeal(void){
 
-
 	/*compute all stiffness matrices for this element*/
 	ElementMatrix* Ke1=CreateKMatrixDiagnosticMacAyealViscous();
@@ -768,5 +767,4 @@
 	delete Ke2;
 	return Ke;
-
 }
 /*}}}*/
