Fixed issues with caching