Fixes multiple cancel issues
Those commits handle some not yet detected cases where cancel didn't correctly stop the ongoing code execution.
Those commits handle some not yet detected cases where cancel didn't correctly stop the ongoing code execution.