diff --git a/km3io/offline.py b/km3io/offline.py
index 020896fd2fc7b1f9181552eda0613c45f3546a8f..bc6f379f1321798c3cdbd11b62f3763c03835010 100644
--- a/km3io/offline.py
+++ b/km3io/offline.py
@@ -555,7 +555,7 @@ class OfflineReader:
             empty and does not contain an empty list, then False is written in the
             corresponding index.
         """
-        for i, rs in enumerate(chunk_arr):
+        for i, rs in enumerate(array):
             try:
                 if len(rs)==0:
                     j = None