Fix bug in email templates