fixed bug in cpu_core calculation