Fixed bug in random rounding