Fix some minor bugs in email templates