Fixed the Parallel.ForEach bug