fixed bug in the migration