Fixed bugs related to buying upgrades and items after trying to refactor it to pass in item and not just id