Fix a pthread's syn problem.