Fixed templating errors