Small change, added check to make sure we don't waste time spawning workers if the number of CPU's is larger than the number of problems