Fixes for cache