Fix templating bug