add in calls to pthread_mutex_destroy