Fix issues with mailer