Fix parallel processing system (thread was not safe).