fixed form validation bugs