diff --git a/stmts.py b/stmts.py
index 57e4a66b48ae44f41b2727cebf764b4313b472aa_c3RtdHMucHk=..5c8280470677ef4e3d03d0ce8fb91757b722b9b1_c3RtdHMucHk= 100644
--- a/stmts.py
+++ b/stmts.py
@@ -247,7 +247,7 @@
         """return the root node of the tree"""
         if self.parent is None:
             return self
-        return self.parent
+        return self.parent.root
     
     # access to select statements property, which in certain condition
     # should have homogeneous values (don't use this in other cases)