Adding ability to hide the dialog