Fixed a bug with email validation