[backport] fixes #1595

cancels scheduled tasks