fixed bug getting number of cores