Populate templateName correctly