Small fixes to caching stuff.