Bug fix for form validation.