diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp
index db5456a403ff391c779ef12df84c297316e13790..97175ff748d1da22977c747e65b63ddf37519b35 100644
--- a/Geo/GModel.cpp
+++ b/Geo/GModel.cpp
@@ -588,8 +588,7 @@ int GModel::adaptMesh(int technique, simpleFunction<double> *f, std::vector<doub
 	}
       }
 
-      nbElems = elements.size();
-      if (nbElems == 0)return -1;
+      if (elements.size() == 0)return -1;
  
       fields->reset();
       int id = fields->newId();
@@ -614,6 +613,7 @@ int GModel::adaptMesh(int technique, simpleFunction<double> *f, std::vector<doub
 	}
       }
      
+      nbElems = getNumMeshElements();
       if (++ITER >= niter) break;
       if (fabs((double)(nbElems - nbElemsOld)) < 0.01 * nbElemsOld) break;
 
diff --git a/Mesh/meshMetric.cpp b/Mesh/meshMetric.cpp
index ac01697be3a41a6fe957dc318cdbe56781477138..79c0e52a4797eb42fe89d9c311c24cd4a286f93c 100644
--- a/Mesh/meshMetric.cpp
+++ b/Mesh/meshMetric.cpp
@@ -286,8 +286,7 @@ void meshMetric::computeMetric(){
       lambda3 = (_dim == 3)? S(2) : 1.; 
    //}
 
-    if (_technique == meshMetric::HESSIAN || (dist < _E && _technique == meshMetric::LEVELSET) 
-	|| (dist < _E && _technique == meshMetric::FREY)){
+    if (_technique == meshMetric::HESSIAN || (dist < _E && _technique == meshMetric::FREY)){
       lambda1 = std::min(std::max(fabs(S(0))/_epsilon,1./(hmax*hmax)),1./(hmin*hmin));
       lambda2 = std::min(std::max(fabs(S(1))/_epsilon,1./(hmax*hmax)),1./(hmin*hmin));
       lambda3 = (_dim == 3) ? std::min(std::max(fabs(S(2))/_epsilon,1./(hmax*hmax)),1./(hmin*hmin)) : 1.;