diff --git a/src/sphere/edfb.cpp b/src/sphere/edfb.cpp
index 574c089e6245b7e82eb7b0c24fbaf3875e8d9d4b..9ca373da45f620309468938e91bcb9b751e451fe 100644
--- a/src/sphere/edfb.cpp
+++ b/src/sphere/edfb.cpp
@@ -361,7 +361,10 @@ int main(int argc, char **argv) {
   last_read_line++;
   iog = new int[nsph];
   for (int i = 0; i < nsph; i++) {
-    sscanf(file_lines[last_read_line].c_str(), " %d", (iog + i));
+    string read_format = "";
+    for (int j = 0; j < i; j++) read_format += " %*d";
+    read_format += " %d";
+    sscanf(file_lines[last_read_line].c_str(), read_format.c_str(), (iog + i));
   }
   nshl = new int[nsph];
   ros = new double[nsph];