fixed caching bug