Fix unexpected timout due to race condition, I think, on the timing.