Bug fixes and improvements in migration.