Fix wait until submitting form