How can I prevent the propagation of samples from one task to another?