Fixed bug in email templates