fix proper node handling of pthread_cond_wait()