fixed email sending problem