fixing the parent reference