Better handling of dialog.