Some fixes to Local Caching

Fixes from #133