Form stuck on please wait when submit button is clicked