fix issues in migrations