Fixed caching bug