fixing form validation