fixed simple bug in form validation