Changed to calling dialogs on separate threads.

Changed to calling dialogs on separate threads.