compiling and condition variable fixed