Added few fixes for migration.