Minor fix to form validation