fixed a randomizer bug