fixes to caching