Fixed bug sending email.