Minor changes to caching