Fixing error on cache retrieval