email alerts bug fix