fixed emailing issues