Fixed broken tests on upgrade