some fixes to the rand functions in fallbacks and dirichlet