diff --git a/functions/classes.py b/functions/classes.py
index d5854b8944fac0d9c3bb18d59d2a2a4fb79fd7a1..758fbb1821b0988c64b2335487786427ed196b89 100644
--- a/functions/classes.py
+++ b/functions/classes.py
@@ -158,7 +158,7 @@ class LegoAssembly:
     def get_component_list(self, max_depth: int = -1) -> List[LegoComponent]:
         component_list = []
         component_list.extend(self.components)
-        if max_depth > 0:
+        if max_depth > 0 or max_depth < 0:
             for assembly in self.assemblies:
                 component_list.extend(assembly.get_component_list(max_depth - 1))
         return component_list