The modulo operator is not a uniform mapping; use Lemire's nearly divisionless method or simple rejection sampling and move on.