fix modals that reload the parent rather than closing the dialog