fixed bugs with migration files