Fixed cancel functionality