fix bug "Condition.await() not in loop"