fix pthread_join and pthread_create args so they work at all