fix form submit with errors