fix avg calc bug + WS cleanup in jobs_sampler_cpu