fix form submission bug