Fixing form validation