Fixes dialog hiding so it doesnt block the UI
Merge pull request #778 from jhogendorn/baddialog

Fixes dialog hiding so it doesnt block the UI