Fix broken caching mechanism