fix caching and rendering