fix breaking bugs in emails