fixed issues with email validation