dismiss dialog when selected