diff --git a/src/geo/GModelIO_INP.cpp b/src/geo/GModelIO_INP.cpp
index ab02c1182f75199f9431423971cd0fdc080ecccc..90d40eb3eacd3a810b087ccff5103e1e0a1e5d46 100644
--- a/src/geo/GModelIO_INP.cpp
+++ b/src/geo/GModelIO_INP.cpp
@@ -114,27 +114,27 @@ int GModel::writeINP(const std::string &name, bool saveAll,
     // elements: is there this concept in Abaqus?) if saveGroupsOfElements is
     // positive; if saveGroupsOfElements is negative, only save groups of
     // dimension dim if the (dim+1)^th least significant digit of
-    // -saveGroupsOfElements is non-zero (for example: -100 will only save
-    // surfaces, while -1010 will save volumes and curves)
+    // -saveGroupsOfElements is 1 (for example: -100 will only save surfaces,
+    // while -1010 will save volumes and curves)
     for(int dim = 1; dim <= 3; dim++) {
-      if(saveGroupsOfElements < 0 &&
-         !((-saveGroupsOfElements / (int)std::pow(10, dim)) % 10)) {
-        continue;
-      }
-      for(auto it = groups[dim].begin(); it != groups[dim].end(); it++) {
-        std::vector<GEntity *> &ent = it->second;
-        fprintf(fp, "*ELSET,ELSET=%s\n",
-                physicalName(this, dim, it->first).c_str());
-        int n = 0;
-        for(std::size_t i = 0; i < ent.size(); i++) {
-          for(std::size_t j = 0; j < ent[i]->getNumMeshElements(); j++) {
-            MElement *e = ent[i]->getMeshElement(j);
-            if(n && !(n % 10)) fprintf(fp, "\n");
-            fprintf(fp, "%lu, ", e->getNum());
-            n++;
+      if(saveGroupsOfElements > 0 ||
+         (saveGroupsOfElements < 0 &&
+          ((-saveGroupsOfElements / (int)std::pow(10, dim)) % 10) == 1)) {
+        for(auto it = groups[dim].begin(); it != groups[dim].end(); it++) {
+          std::vector<GEntity *> &ent = it->second;
+          fprintf(fp, "*ELSET,ELSET=%s\n",
+                  physicalName(this, dim, it->first).c_str());
+          int n = 0;
+          for(std::size_t i = 0; i < ent.size(); i++) {
+            for(std::size_t j = 0; j < ent[i]->getNumMeshElements(); j++) {
+              MElement *e = ent[i]->getMeshElement(j);
+              if(n && !(n % 10)) fprintf(fp, "\n");
+              fprintf(fp, "%lu, ", e->getNum());
+              n++;
+            }
           }
+          fprintf(fp, "\n");
         }
-        fprintf(fp, "\n");
       }
     }
   }
diff --git a/src/mesh/meshGFace.cpp b/src/mesh/meshGFace.cpp
index b635ee2921c8ca72ee58dec45dad0832dea77c09..a8c4e24b8ab7ec68d255f1e5fc0054b33e355084 100644
--- a/src/mesh/meshGFace.cpp
+++ b/src/mesh/meshGFace.cpp
@@ -2057,6 +2057,9 @@ static bool buildConsecutiveListOfVertices(
     count++;
   }
 
+  Msg::Debug("Succeeded finding consecutive list of nodes on surface "
+             "%d, with tolerance %g", gf->tag(), tol);
+
   // we're all set!
   recoverMap.insert(recoverMapLocal.begin(), recoverMapLocal.end());