fix caching when locked