wait for results to close before showing dialog