fixed a typo in _thread_join method