migrate script fix