Changed the way a template is set.