Close the dialog window when clicking on the cancel button