fix migrate issues.