make sure the modal is discarded when the reload button is clicked