Fixed and improved sampler