Fixes bug when hardware_concurrency() returns 0 results in erroneous behaviour