fix a bug in mailer