Fixed an issue with recovery not cancelling all jobs.
git cherry-pick'ed the commits from #326 (closed), @dbeltran.
git cherry-pick