Fixing issue with cache not working