fix a bug with mailer