Fix endless caching bug