So you mean if the user clicked the X button hat comes with the dialog, this logic shouldn't be executed?