diff --git a/platypush/plugins/inspect/__init__.py b/platypush/plugins/inspect/__init__.py
index a41c6d9c..1449aab3 100644
--- a/platypush/plugins/inspect/__init__.py
+++ b/platypush/plugins/inspect/__init__.py
@@ -62,6 +62,8 @@ class InspectPlugin(Plugin):
                     e,
                 )
 
+                self.logger.exception(e)
+
     def refresh_cache(self, force: bool = False):
         """
         Refreshes the components cache.
diff --git a/platypush/plugins/matrix/client.py b/platypush/plugins/matrix/client.py
index 9bf33679..d5a22cd8 100644
--- a/platypush/plugins/matrix/client.py
+++ b/platypush/plugins/matrix/client.py
@@ -352,7 +352,7 @@ class MatrixClient(AsyncClient):
 
     def get_devices_by_user(
         self, user_id: Optional[str] = None
-    ) -> Dict[str, Dict[str, OlmDevice]] | Dict[str, OlmDevice]:
+    ) -> Union[Dict[str, Dict[str, OlmDevice]], Dict[str, OlmDevice]]:
         devices = dict(self.device_store.items())
 
         if user_id:
@@ -371,7 +371,7 @@ class MatrixClient(AsyncClient):
 
     def get_devices_by_room(
         self, room_id: Optional[str] = None
-    ) -> Dict[str, Dict[str, OlmDevice]] | Dict[str, OlmDevice]:
+    ) -> Union[Dict[str, Dict[str, OlmDevice]], Dict[str, OlmDevice]]:
         devices = {
             room_id: {
                 device_id: device