fixed numCPUs bug