Fixed upgrade all bug