Miscalculation with cookie upgrades