Fixed error with the each thread separate random optimization.