diff --git a/common/python/nomadcore/simple_parser.py b/common/python/nomadcore/simple_parser.py
index 445649a24612853cf54ddd30a394c5f46efb1e06..ba0dd5ec15a2fa351887b78056f25ed94ac70182 100644
--- a/common/python/nomadcore/simple_parser.py
+++ b/common/python/nomadcore/simple_parser.py
@@ -1159,7 +1159,7 @@ class SimpleParser(object):
                 idx -= 1
         elif self.context[len(self.context) - 1].compiledMatcher.floating and self.parserBuilder.compiledMatchers[targetMatcher.index].floating:
             # we are in a floating match and we go to another one, rewind only the floating part
-            while not states[idx].floating:
+            while not self.context[idx].compiledMatcher.floating:
                 idx += 1
             idx -= 1
         # close