fixed template caching