Fix migrateSession regression. Fixes #32