fixed some templating stuff