Fixed a few thing so that now Cond.Wait / Cond.Signal work as expected. Also added magical #ifdef