Fixed issue in email being sent