properly remove the modal from DOM on modal dismiss