fixed form validation bug