Fix bug where disabling buttons on submit prevents submitting form