fix for multiple dialogs