Fixed the template rendering