close modal immediately when clicking submit button