Fix bug with closeAll when the user choose cancel.