Fix cnd_wait()