fix bug in the sampling (problem with process execution)