Index: /issm/trunk-jpl/src/c/classes/Inputs/Inputs.cpp
===================================================================
--- /issm/trunk-jpl/src/c/classes/Inputs/Inputs.cpp	(revision 22554)
+++ /issm/trunk-jpl/src/c/classes/Inputs/Inputs.cpp	(revision 22555)
@@ -32,9 +32,20 @@
 
 	_assert_(in_input); 
-
-	/*Delete input if it already exists*/
-	this->DeleteInput(in_input->InstanceEnum());
-
-	/*Now add new input to the dataset*/
+	int enum_name = in_input->InstanceEnum();
+
+	/*Go through current inputs*/
+	int size = this->Size();
+	for(int i=0;i<size;i++){
+		Input* input=xDynamicCast<Input*>(this->objects[i]);
+
+		/*If it's already there, remove it and replace it with in_input*/
+		if(input->InstanceEnum()==enum_name){
+			delete input;
+			this->objects[i] = in_input;
+			return 1;
+		}
+	}
+
+	/*It is new, add input to the dataset*/
 	this->AddObject(in_input);
 
@@ -47,7 +58,15 @@
 	this->DeleteInput(newenumtype);
 
-	/*Now get old input and change its enum (do not error out if not found)*/
-	Input* input=this->GetInput(oldenumtype);
-	if(input) input->ChangeEnum(newenumtype);
+	/*Go through current inputs*/
+	int size = this->Size();
+	for(int i=0;i<size;i++){
+		Input* input=xDynamicCast<Input*>(this->objects[i]);
+
+		/*If it's already there, remove it and replace it with in_input*/
+		if(input->InstanceEnum()==oldenumtype){
+			input->ChangeEnum(newenumtype);
+			return;
+		}
+	}
 }/*}}}*/
 void Inputs::Configure(Parameters* parameters){/*{{{*/
