fix strangeness for pthreads