Fix bug in email send feature