fixed randomizing issue