fix a small bug in defining number for worker-cores