Index: ../trunk-jpl/src/c/modules/OutputDefinitionsResponsex/OutputDefinitionsResponsex.cpp
===================================================================
--- ../trunk-jpl/src/c/modules/OutputDefinitionsResponsex/OutputDefinitionsResponsex.cpp	(revision 18521)
+++ ../trunk-jpl/src/c/modules/OutputDefinitionsResponsex/OutputDefinitionsResponsex.cpp	(revision 18522)
@@ -9,23 +9,20 @@
 
 IssmDouble OutputDefinitionsResponsex(FemModel* femmodel,const char* output_string){
 
-	Definition *definition         = NULL;
-	DataSet    *output_definitions = NULL;
-	IssmDouble  return_value;
-
 	/*Ok, go find the output definitions dataset in the parameters, where our responses are hiding: */
-	output_definitions=((DataSetParam*)femmodel->parameters->FindParamObject(OutputdefinitionEnum))->value;
+	DataSet* output_definitions=((DataSetParam*)femmodel->parameters->FindParamObject(OutputdefinitionEnum))->value;
 
 	/*Now, go through the output definitions, and retrieve the object which corresponds to our requested response, output_string: */
 	for(int i=0;i<output_definitions->Size();i++){
 		
-		definition=xDynamicCast<Definition*>(output_definitions->GetObjectByOffset(i));
+		//Definition* definition=xDynamicCast<Definition*>(output_definitions->GetObjectByOffset(i));
+		Definition* definition=dynamic_cast<Definition*>(output_definitions->GetObjectByOffset(i));
 
 		char* name = definition->Name();
-		if (strcmp(name,output_string)==0){
+		if(strcmp(name,output_string)==0){
 
 			/*This is the object that we have been chasing for. compute the response and return: */
-			return_value=definition->Response(femmodel);
+			IssmDouble return_value=definition->Response(femmodel);
 		
 			/*cleanup: */
 			xDelete<char>(name);
