Fix Command#cancel test failure