Fix cpu_count not initialised bug