Fix saving migrated records and update tests

[Resolves #57]