#3: Fixing bugs in dices algorithm.