fix migrate issues