corrected a race affecting non-deterministic threads