Fix migrate script