Fixed the maximum amount of threads in the reduce algoritm