Stopped threads shouldn't count as active
Correct bookkeeping for number of active threads on exit