migrate: Another one...
migrate: Fix incorrect variable names
Merge pull request #1404 from mc10/migrate

migrate: More bug fixes