fixing external dialogs (fixes #994)