fixed bug in email detection