fixed bug in getnumcpu