Added support for processing dialogs.