Fix upgrade tests