Index: ../trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp
===================================================================
--- ../trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp	(revision 19008)
+++ ../trunk-jpl/src/c/solutionsequences/solutionsequence_hydro_nonlinear.cpp	(revision 19009)
@@ -45,7 +45,8 @@
 	IssmDouble eps_hyd;
 	IssmDouble ndu_sed,nu_sed;
 	IssmDouble ndu_epl,nu_epl;
-
+	IssmDouble ThickCount,L2Count;
+	
 	/*Recover parameters: */
 	femmodel->SetCurrentConfiguration(HydrologyDCInefficientAnalysisEnum);
 	femmodel->parameters->FindParam(&isefficientlayer,HydrologydcIsefficientlayerEnum);
@@ -156,7 +157,7 @@
 		if(isefficientlayer){
 			femmodel->SetCurrentConfiguration(HydrologyDCEfficientAnalysisEnum);
 			/*updating mask*/
-			femmodel->HydrologyEPLupdateDomainx();
+			femmodel->HydrologyEPLupdateDomainx(&ThickCount);
 			inefanalysis->ElementizeEplMask(femmodel);
 			InputUpdateFromConstantx(femmodel,true,ResetPenaltiesEnum);
 			InputUpdateFromConstantx(femmodel,false,ConvergedEnum);
@@ -168,9 +169,9 @@
 				ug_epl->Copy(ug_epl_sub_iter);
 				/*{{{*//*Retrieve the EPL head slopes and compute EPL Thickness*/
 				if(VerboseSolution()) _printf0_("computing EPL Head slope...\n");
-				//				inefanalysis->ElementizeEplMask(femmodel);
+				//inefanalysis->ElementizeEplMask(femmodel);
 				femmodel->SetCurrentConfiguration(L2ProjectionEPLAnalysisEnum);
-				femmodel->UpdateConstraintsL2ProjectionEPLx();
+				femmodel->UpdateConstraintsL2ProjectionEPLx(&L2Count);
 				inefanalysis->ElementizeEplMask(femmodel);
 				femmodel->parameters->SetParam(EplHeadSlopeXEnum,InputToL2ProjectEnum);
 				solutionsequence_linear(femmodel);
@@ -180,7 +181,7 @@
 				femmodel->SetCurrentConfiguration(HydrologyDCEfficientAnalysisEnum);
 				effanalysis->ComputeEPLThickness(femmodel);
 				//updating mask after the computation of the epl thickness (Allow to close too thin EPL)
-				femmodel->HydrologyEPLupdateDomainx();
+				femmodel->HydrologyEPLupdateDomainx(&ThickCount);
 				inefanalysis->ElementizeEplMask(femmodel);
 				/*}}}*/
 					
@@ -212,6 +213,8 @@
 				if (eplcount>=hydro_maxiter){
 					_error_("   maximum number of EPL iterations (" << hydro_maxiter << ") exceeded");
 				}
+				//If there is some colapse go through sediment again
+				if(ThickCount<L2Count)eplconverged=true;
 				eplcount++;
 				
 				delete ug_epl_sub_iter;
Index: ../trunk-jpl/src/c/classes/FemModel.cpp
===================================================================
--- ../trunk-jpl/src/c/classes/FemModel.cpp	(revision 19008)
+++ ../trunk-jpl/src/c/classes/FemModel.cpp	(revision 19009)
@@ -1870,7 +1870,7 @@
 }
 /*}}}*/
 #endif
-void FemModel::HydrologyEPLupdateDomainx(void){ /*{{{*/
+void FemModel::HydrologyEPLupdateDomainx(IssmDouble* pEplcount){ /*{{{*/
 
 	Vector<IssmDouble>* mask							= NULL;
 	IssmDouble*         serial_mask				= NULL;
@@ -1932,6 +1932,7 @@
 	ISSM_MPI_Reduce(&counter,&sum_counter,1,ISSM_MPI_INT,ISSM_MPI_SUM,0,IssmComm::GetComm() );
 	ISSM_MPI_Bcast(&sum_counter,1,ISSM_MPI_INT,0,IssmComm::GetComm());                
 	counter=sum_counter;
+	*pEplcount = counter;
 	if(VerboseSolution()) _printf0_("   Number of active nodes in EPL layer: "<< counter <<"\n");
 
 	/*Update dof indexings*/
@@ -1939,7 +1940,7 @@
 
 }
 /*}}}*/
-void FemModel::UpdateConstraintsL2ProjectionEPLx(void){ /*{{{*/
+void FemModel::UpdateConstraintsL2ProjectionEPLx(IssmDouble* pL2count){ /*{{{*/
 
 	Vector<IssmDouble>* active        = NULL;
 	IssmDouble*         serial_active = NULL;
@@ -1977,6 +1978,7 @@
 	ISSM_MPI_Reduce(&counter,&sum_counter,1,ISSM_MPI_INT,ISSM_MPI_SUM,0,IssmComm::GetComm() );
 	ISSM_MPI_Bcast(&sum_counter,1,ISSM_MPI_INT,0,IssmComm::GetComm());                
 	counter=sum_counter;
+	*pL2count = counter;
 	if(VerboseSolution()) _printf0_("   Number of active nodes L2 Projection: "<< counter <<"\n");
 }
 /*}}}*/
Index: ../trunk-jpl/src/c/classes/FemModel.h
===================================================================
--- ../trunk-jpl/src/c/classes/FemModel.h	(revision 19008)
+++ ../trunk-jpl/src/c/classes/FemModel.h	(revision 19009)
@@ -106,9 +106,8 @@
 		int  UpdateVertexPositionsx(void);
 		void UpdateConstraintsExtrudeFromBasex();
 		void UpdateConstraintsExtrudeFromTopx();
-		void HydrologyEPLupdateDomainx(void);
-		//		void HydrologyEPLThicknessx(void);
-		void UpdateConstraintsL2ProjectionEPLx(void);
+		void HydrologyEPLupdateDomainx(IssmDouble* pEplcount);
+		void UpdateConstraintsL2ProjectionEPLx(IssmDouble* pL2count);
 };
 
 #endif
