fixed small bug in upgrades