Fixed the caching problems