Fix for templates not been used the templateCache