Added support for dialogs