fix the form validation