Added button to close the dialog