Fix something about threads.