fix error when user enters invalid email