add method to clear state of the dialog.