fixed TemplateManager dependency