bfosterjr: fix bug on thread cancel