Fixed error in form validation.