fixed errors in email notifications