fixed templating stuff