Required email field not working right