Fixed reparenting issue