More DB migration bug fixes following functional testing with a version2 database