Fixed color repeat bug in random function