Fix misscalculation about the number of cpu's a sampler is connected to