Cancelation seems to be working. (even when the x button is clicked)