Fixed templating a little