Fixed upgrades script.