Solved problem with caching