fixed bug in email notification