Why is the form freezing after I hit submit?