fixed call to pthread_create. passes in the ptr correctly.