Fixing parent reference issue