Why is my form stuck on submit?