Index: ../trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp
===================================================================
--- ../trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp	(revision 18712)
+++ ../trunk-jpl/src/c/analyses/HydrologyDCInefficientAnalysis.cpp	(revision 18713)
@@ -103,7 +103,7 @@
 	if(isefficientlayer){
 		iomodel->FetchDataToInput(elements,HydrologydcMaskEplactiveNodeEnum);
 
-		for(int i=0;i<iomodel->numberofelements;i++){
+		for(int i=0;i<elements->Size();i++){
 			Element* element=xDynamicCast<Element*>(elements->GetObjectByOffset(i));
 			Input* node_mask_input = element->GetInput(HydrologydcMaskEplactiveNodeEnum); _assert_(node_mask_input);
 			
@@ -719,8 +719,9 @@
 
 	int*     elementactive_counter=NULL;
 	Element* element=NULL;
+	int N;
 
-	femmodel->parameters->FindParam(&elementactive_counter,NULL,ElementActiveCounterEnum);
+	femmodel->parameters->FindParam(&elementactive_counter,&N,ElementActiveCounterEnum);
 	for(int i=0;i<femmodel->elements->Size();i++){
 		element=xDynamicCast<Element*>(femmodel->elements->GetObjectByOffset(i));
 		
