Fixed the migrate script