Merge pull request #2982 from aanbar/migration-fix

Fix #2970