fix invalid email address bug