Fixed Discard and Cancel bugs