Fixed error in email notification