bugfixes and testing the new migration