fix cancelAll crash (Issue #809)