Fixed condition_variable bug leading to deadlocks