Fixed bug such that submit button will not show if mode is not accepted