fixed bugs with accidentally purchasing upgrades