Fixed issue affecting migrating DBs