Fixes form submit in error case.