fixed a bug in sampling distributions