fixed bug when using random draws from the posterior