fixing multiple dialogs