diff --git a/nomad/archive.py b/nomad/archive.py
index a9be785ac9795a34c8f0ad9f09fad231fd02f643..1652b37bba6fe01f4404e22ceca3320c37a9f2c7 100644
--- a/nomad/archive.py
+++ b/nomad/archive.py
@@ -608,7 +608,7 @@ def query_archive(f_or_archive_reader: Union[str, ArchiveReader, BytesIO], query
                     pass
                 else:
                     length = len(archive_child)
-                    if isinstance(index, list):
+                    if isinstance(index, tuple):
                         index = (_fix_index(index[0], length), _fix_index(index[1], length))
                         if index[0] == index[1]:
                             archive_child = [archive_child[index[0]]]
diff --git a/nomad/client.py b/nomad/client.py
index 9721c9610a0dd47f4b5af18a5eead915cfda37d4..fd7a0dc4f9f4fe94f2e63f69471a852968ea9db1 100644
--- a/nomad/client.py
+++ b/nomad/client.py
@@ -271,8 +271,11 @@ class ArchiveQuery(collections.abc.Sequence):
             section_run_key = next(key for key in required if key.split('[')[0] == 'section_run')
             if section_run_key is not None:
                 # add all quantities in required to the query part
-                quantities = set()
-                stack = [required[section_run_key]]
+                quantities = {'section_run'}
+                stack = []
+                section_run = required[section_run_key]
+                if isinstance(section_run, dict):
+                    stack.append(section_run)
                 while len(stack) > 0:
                     required_dict = stack.pop()
                     for key, value in required_dict.items():