Fixed a bug with the templating