Fix form submission bug