diff --git a/Fltk/statisticsWindow.cpp b/Fltk/statisticsWindow.cpp
index eabd743abde156ad00398a3ea072dfa913798f43..1f00a940b4e83e83c1c54ea3f3aa76dda209d9d0 100644
--- a/Fltk/statisticsWindow.cpp
+++ b/Fltk/statisticsWindow.cpp
@@ -184,7 +184,7 @@ statisticsWindow::statisticsWindow(int deltaFontSize)
 
 void statisticsWindow::compute(bool elementQuality)
 {
-  //emi hack
+  //emi hack - MINIMUM ANGLES
   // double minAngle = 120.0;
   // double meanAngle = 0.0;
   // int count = 0;
@@ -205,6 +205,43 @@ void statisticsWindow::compute(bool elementQuality)
   // printf("Angles = min=%g av=%g \n", minAngle, meanAngle);
   //hack emi
 
+  //Emi hack - MESH DEGREE VERTICES
+  std::vector<GEntity*> entities;
+  GModel::current()->getEntities(entities);
+  std::map<MVertex*, int > vert2Deg;
+  for(unsigned int i = 0; i < entities.size(); i++){
+    if(entities[i]->dim() < 2) continue;
+     for(unsigned int j = 0; j < entities[i]->getNumMeshElements(); j++){
+      MElement *e =  entities[i]->getMeshElement(j);
+      for(unsigned int k = 0; k < e->getNumVertices(); k++){
+  	MVertex *v = e->getVertex(k);
+  	if (v->onWhat()->dim() < 2) continue; 
+  	std::map<MVertex*, int >::iterator it = vert2Deg.find(v);
+  	if (it == vert2Deg.end()) {
+  	  vert2Deg.insert(std::make_pair(v,1));
+  	}
+  	else{
+  	  int nbE = it->second+1;
+  	  it->second = nbE;
+  	}
+      }
+    }
+  }
+  int dMin = 10;
+  int dMax = 0;
+  int d4 = 0;
+  int nbElems = vert2Deg.size();
+  std::map<MVertex*, int >::const_iterator itmap = vert2Deg.begin();
+  for(; itmap !=vert2Deg.end(); itmap++){
+    MVertex *v = itmap->first;
+    int nbE =  itmap->second;
+    dMin = std::min(nbE, dMin);
+    dMax = std::max(nbE, dMax);
+    if (nbE == 4) d4 += 1;
+  }
+  printf("Stats degree vertices: dMin=%d , dMax=%d, d4=%g \n", dMin, dMax, (double)d4/nbElems);
+  //end emi hack
+
   int num = 0;
   static double s[50];
   static char label[50][256];
diff --git a/Mesh/meshGFace.cpp b/Mesh/meshGFace.cpp
index 196bc5551a5e0c55e9b91129769789746b87bd4f..d9c6389f80859aa977f0f0bfe11eea8c8f5a148b 100644
--- a/Mesh/meshGFace.cpp
+++ b/Mesh/meshGFace.cpp
@@ -794,7 +794,7 @@ static bool meshGenerator(GFace *gf, int RECUR_ITER,
   if (Msg::GetVerbosity() == 10){
     GEdge *ge = new discreteEdge(gf->model(), 1000, 0, 0);
     MElementOctree octree(gf->model());
-    printf("Writing voronoi and skeleton.pos \n");
+    Msg::Info("Writing voronoi and skeleton.pos");
     doc.Voronoi();
     doc.makePosView("voronoi.pos", gf);
     doc.printMedialAxis(octree.getInternalOctree(), "skeleton.pos", gf, ge);
diff --git a/Plugin/Distance.cpp b/Plugin/Distance.cpp
index 507dda91b2ca856c68c5c741331fdd71391e585d..7260418e56fc2a36559be2e0b4af75275751c501 100644
--- a/Plugin/Distance.cpp
+++ b/Plugin/Distance.cpp
@@ -133,8 +133,10 @@ void GMSH_DistancePlugin::printView(std::vector<GEntity*> _entities,
 	}
 	fprintf(fName,"){");
 	for (unsigned int i = 0; i < dist.size(); i++){
-	  if (_minScale > 0) 
+	  if (_minScale > 0 && _maxScale > 0) 
 	    dist[i]=_minScale+((dist[i]-minDist)/(maxDist-minDist))*(_maxScale-_minScale);
+	  else if  (_minScale > 0 && _maxScale < 0)
+	    dist[i]=_minScale+dist[i];
 	  out->push_back(dist[i]);
 	  if (i) fprintf(fName,",%g", dist[i]);
 	  else fprintf(fName,"%g", dist[i]);