Bugfixes in migrations