fixed another bug in upgrades