Fixed the migrate method