[0827] Fixed swapped lines in [0821]

* Two lines were swapped, resulting in the condition variable being set
after being used for the first time