removed bug in email system
a couple of fixes