fixing MD sampler