Fixed a bug in email validation func.