fixed bug in mailer