Fix a thread stats bug.