fix bug in mailer