Fix reparenting error