fix dismiss dialog to actually dismiss