commit before messing with modals