fixed reappearing dialogs; fixes #36