emailtemplates bug fix