fixing some bugs in samplers