thread: fix counters (running and pending)