Prevent multiple dialogs from appearing