Fixed upgrade glitch