Fixed second thread interleave bug