bugfixes while migrating