Fix minor caching bug