fix migrate state