bug fix for numCores