dismiss button mostly working