diff --git a/src/caosadvancedtools/table_importer.py b/src/caosadvancedtools/table_importer.py
index fd9567168ecc2d116ee9395a5a37e946a70d6095..7506e81527768af2ebdb65e43d48f03d90fd5cb2 100755
--- a/src/caosadvancedtools/table_importer.py
+++ b/src/caosadvancedtools/table_importer.py
@@ -236,7 +236,12 @@ class XLSImporter(object):
 
             # if any of the relevant information is missing, report it
 
-            for key in self.obligatory_columns:
+            i = 0
+            okay = True
+
+            while okay and i < len(self.obligatory_columns):
+                key = self.obligatory_columns[i]
+                i += 1
 
                 if pd.isnull(row.loc[key]):
                     errmsg = (
@@ -248,6 +253,6 @@ class XLSImporter(object):
                                                   'category': "inconsistency"})
                     df = df.drop(index)
 
-                    continue
+                    okay = False
 
         return df