added protection for dialogs with no method.