Updated due to changes in pthreads