Fixed Upgrade caching bugs