fix some bugs in posterior distribution option