Fixed issues with sample_from_likelihoods and sample_beta

This would close issues #88 and #89.