fixed some errors with the email handler