fixed issues with caching