fixed templating bug