diff --git a/lofar_station_client/file_access/_utils.py b/lofar_station_client/file_access/_utils.py
index bb8eaddf758f326b67efadb438f3fb8adc42fd19..6a349018e6abf5f96c11198c094de4421c3f0753 100644
--- a/lofar_station_client/file_access/_utils.py
+++ b/lofar_station_client/file_access/_utils.py
@@ -1,14 +1,13 @@
-#  Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy)
+#  Copyright (C) 2024 ASTRON (Netherlands Institute for Radio Astronomy)
 #  SPDX-License-Identifier: Apache-2.0
 
 """
 General utils
 """
-from typing import Optional, Type, get_type_hints
+from typing import Optional, Type, get_type_hints, get_args, get_origin
 
 from numpy import ndarray
 
-from ._compat_utils import get_args, get_origin
 from ._monitoring import MonitoredWrapper
 
 
diff --git a/lofar_station_client/file_access/hdf/_hdf5_utils.py b/lofar_station_client/file_access/hdf/_hdf5_utils.py
index 7dbbfc553b7df0755d0583796a0f4da3b9a76b29..e2ce6275d1a241fec9661c7ab7d8109f3d95a7df 100644
--- a/lofar_station_client/file_access/hdf/_hdf5_utils.py
+++ b/lofar_station_client/file_access/hdf/_hdf5_utils.py
@@ -1,4 +1,4 @@
-#  Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy)
+#  Copyright (C) 2024 ASTRON (Netherlands Institute for Radio Astronomy)
 #  SPDX-License-Identifier: Apache-2.0
 
 """
@@ -6,11 +6,11 @@ Utils to handle transformation of HDF5 specific classes to pythonic objects
 """
 import inspect
 from collections.abc import MutableMapping
-from typing import Type, TypeVar
+from typing import Type, TypeVar, get_origin
 
 from numpy import ndarray
 
-from .._compat_utils import get_origin, get_annotations
+from .._compat_utils import get_annotations
 
 T = TypeVar("T")
 
diff --git a/lofar_station_client/file_access/hdf/_hdf_readers.py b/lofar_station_client/file_access/hdf/_hdf_readers.py
index f63ee8017110167060d6ff3d65d808fbb28c2c1f..bdbbe25ab2daa6cc78a774bff4b7826bad39a995 100644
--- a/lofar_station_client/file_access/hdf/_hdf_readers.py
+++ b/lofar_station_client/file_access/hdf/_hdf_readers.py
@@ -1,4 +1,4 @@
-#  Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy)
+#  Copyright (C) 2024 ASTRON (Netherlands Institute for Radio Astronomy)
 #  SPDX-License-Identifier: Apache-2.0
 
 """
@@ -7,7 +7,7 @@ Contains classes to handle file reading
 import inspect
 import weakref
 from inspect import getattr_static
-from typing import TypeVar, Type, List, Dict
+from typing import TypeVar, Type, List, Dict, get_origin
 
 import h5py
 from numpy import ndarray, zeros
@@ -17,7 +17,6 @@ from ._hdf5_utils import (
     _assert_is_dataset,
 )
 from .._attribute_def import AttributeDef
-from .._compat_utils import get_origin
 from .._lazy_dict import lazy_dict
 from .._member_def import MemberDef
 from .._readers import FileReader, DataReader
@@ -169,7 +168,7 @@ class HdfDataReader(DataReader):
         reader = cls.detect_reader(target_type, data_reader)
         result = lazy_dict(dict_type, lambda k: reader(value[k]))
         for k in value.keys():
-            result[k] = lambda k=k: reader(value[k])
+            result[k] = lambda n=k: reader(value[n])
         if dict_type is not dict:
             setattr(result, "_data_reader", cls(data_reader.file_reader, value))
         return result
diff --git a/lofar_station_client/file_access/hdf/_hdf_writers.py b/lofar_station_client/file_access/hdf/_hdf_writers.py
index c745e3bf08f142146f09b8bb6e1fba8f1ce76248..49c871cf1bbbf877311e4d544e9b059cc015ef5c 100644
--- a/lofar_station_client/file_access/hdf/_hdf_writers.py
+++ b/lofar_station_client/file_access/hdf/_hdf_writers.py
@@ -1,11 +1,11 @@
-#  Copyright (C) 2023 ASTRON (Netherlands Institute for Radio Astronomy)
+#  Copyright (C) 2024 ASTRON (Netherlands Institute for Radio Astronomy)
 #  SPDX-License-Identifier: Apache-2.0
 
 """
 Contains classes to handle file writing
 """
 from inspect import getattr_static
-from typing import TypeVar, Type, Dict
+from typing import TypeVar, Type, Dict, get_origin
 
 import h5py
 from numpy import ndarray
@@ -17,7 +17,6 @@ from ._hdf5_utils import (
     _assert_is_dataset,
 )
 from ._hdf_readers import HdfFileReader, HdfDataReader
-from .._compat_utils import get_origin
 from .._lazy_dict import LazyDict
 from .._utils import _wrap, _extract_base_type
 from .._writers import FileWriter, DataWriter
diff --git a/lofar_station_client/statistics/receivers/_zmq.py b/lofar_station_client/statistics/receivers/_zmq.py
index 839519c34a323cefdc1c5a941e7504b65f95dbcd..f078fec6886f915434c2cb67c4bdc0cc737e0e03 100644
--- a/lofar_station_client/statistics/receivers/_zmq.py
+++ b/lofar_station_client/statistics/receivers/_zmq.py
@@ -16,15 +16,13 @@ class ZeroMQReceiver:
     """ZeroMQ Receiver"""
 
     def __init__(self, uri: str):
-
         o = urlsplit(uri)
-        self._ctx: zmq.Context = zmq.Context.instance()
-        self._subscriber: zmq.Socket = self._ctx.socket(zmq.SUB)
-        self._topic: bytes = o.path.strip("/").encode()
 
-        self._subscriber.connect(f"{o.scheme}://{o.netloc}")
-        self._subscriber.setsockopt(zmq.SUBSCRIBE, self._topic)
+        self._topic: bytes = o.path.strip("/").encode()
+        self._uri = f"{o.scheme}://{o.netloc}"
         self._content_type = "application/octet-stream"
+        self._ctx: zmq.Context = zmq.Context.instance()
+        self._subscriber: zmq.Socket = self._ctx.socket(zmq.SUB)
 
         qs = parse_qs(o.query)
         if "content-type" in qs:
@@ -34,6 +32,8 @@ class ZeroMQReceiver:
 
     def __iter__(self):
         """Iterates over all packets in the stream."""
+        self._subscriber.connect(self._uri)
+        self._subscriber.setsockopt(zmq.SUBSCRIBE, self._topic)
         return self
 
     def __next__(self) -> Union[str, dict, bytes]: