Index: ../trunk-jpl/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp	(revision 18677)
+++ ../trunk-jpl/src/c/modules/ModelProcessorx/Control/UpdateElementsAndMaterialsControl.cpp	(revision 18678)
@@ -26,17 +26,21 @@
 
 	iomodel->FetchData(5,InversionControlParametersEnum,InversionCostFunctionsEnum,InversionCostFunctionsCoefficientsEnum,InversionMinParametersEnum,InversionMaxParametersEnum);
 
-	/*Fetch data needed: */
+	/*Fetch Observations */
 	iomodel->Constant(&num_cost_functions,InversionNumCostFunctionsEnum);
 	for(int i=0;i<num_cost_functions;i++){
 		cost_function= reCast<int,IssmDouble>(iomodel->Data(InversionCostFunctionsEnum)[i]);
-		if(cost_function==ThicknessAbsMisfitEnum) iomodel->FetchDataToInput(elements,InversionThicknessObsEnum,0.);
-		else if(cost_function==SurfaceAbsVelMisfitEnum || cost_function==SurfaceRelVelMisfitEnum || cost_function==SurfaceLogVelMisfitEnum || cost_function==SurfaceLogVxVyMisfitEnum || cost_function==SurfaceAverageVelMisfitEnum){
-			iomodel->FetchDataToInput(elements,InversionVxObsEnum,0.);
-			iomodel->FetchDataToInput(elements,InversionVyObsEnum,0.); 
+		if(     cost_function==ThicknessAbsMisfitEnum) iomodel->FetchDataToInput(elements,InversionThicknessObsEnum);
+		else if(cost_function==SurfaceAbsMisfitEnum)   iomodel->FetchDataToInput(elements,InversionSurfaceObsEnum);
+		else if(cost_function==SurfaceAbsVelMisfitEnum
+			  || cost_function==SurfaceRelVelMisfitEnum
+			  || cost_function==SurfaceLogVelMisfitEnum
+			  || cost_function==SurfaceLogVxVyMisfitEnum
+			  || cost_function==SurfaceAverageVelMisfitEnum){
+			iomodel->FetchDataToInput(elements,InversionVxObsEnum);
+			iomodel->FetchDataToInput(elements,InversionVyObsEnum); 
 		}
 	}
-	//iomodel->FetchDataToInput(elements,InversionSurfaceObsEnum,0.);
 
 	for(int i=0;i<num_control_type;i++){
 		control = reCast<int,IssmDouble>(iomodel->Data(InversionControlParametersEnum)[i]);
