Use correct number of threads