fix p_child and reparrenting