Why my form get stuck on submit?