fix pthread_join bug some more.