Bugfix: cores number could be 0