fixing form submission bug