Avoid dialogs empty exception