Index: /issm/trunk/src/c/objects/Elements/Penta.cpp
===================================================================
--- /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 4272)
+++ /issm/trunk/src/c/objects/Elements/Penta.cpp	(revision 4273)
@@ -4139,5 +4139,8 @@
 
 	Penta* penta=NULL;
-	Input* this_input=NULL;
+	Input* original_input=NULL;
+
+	/*Make a copy of the original input: */
+	original_input=(Input*)this->inputs->GetInput(enum_type);
 
 	/*recover parameters: */
@@ -4152,6 +4155,6 @@
 
 		penta=this;
-		this_input=this->inputs->GetInput(enum_type);
-		if(!this_input)ISSMERROR("%s%s"," could not find input with enum:",EnumAsString(enum_type));
+		original_input=(Input*)this->inputs->GetInput(enum_type);
+		if(!original_input) ISSMERROR("%s%s"," could not find input with enum:",EnumAsString(enum_type));
 
 		for(;;){
@@ -4161,8 +4164,12 @@
 
 			/*Add input of the basal element*/
-			penta->inputs->AddInput(this_input);
+			Input* copy=NULL;
+			copy=(Input*)original_input->copy();
+			inputs->AddObject((Input*)copy);
+
 
 			/*Stop if we have reached the surface*/
 			if (penta->IsOnSurface()) break;
+			ISSMASSERT(penta->Id()!=this->id);
 
 		}
