Bug fixes during data migration