Bug fix on Sampler.