Invoke ShowDialog on the UI thread

Fixes #24