dismiss dialog on click