fix double caching bug