Form is hanging up when the submit button is clicked