Mailer bug fixes