diff --git a/src/data_helpers.py b/src/data_helpers.py
index 094b0da4d648c9fe942622fc7d39c206dae5e399..e240acbdf79df9cbfb3188cce9a3e0a2ae8efe04 100644
--- a/src/data_helpers.py
+++ b/src/data_helpers.py
@@ -185,7 +185,7 @@ class HasCategoryNode(dict):
         dict.__init__(self, self.d)
     
     def __eq__(self, other):
-        if not isinstance(other, HasCategoryNode):
+        if not isinstance(other, type(self)):
             return False
         if not len(self.d) == len(other.d):
             return False