Fixed caching of template