fixed code gen - RemoveParent