fix the bug of MHSampler.