fix sampling.