Math.random not generating equal list distrubution

URL of experiment:

Is this:
A problem with my code
Just how browsers typically generate random numbers and theres nothing I can do about it
A problem with how psychoJS implements an experiment to someone.

Description of the problem:
We generate a random number to select 1 of 40 lists to show the participants.
rand_list_num = Math.floor((Math.random() * max_list_num) + 1);
The random number generator is working however when we run this experiment 200 times the standard deviation of the numbers generated is 2.5. Indicating that there are a lot of random numbers that are chosen more frequently than others.

Is there any way to get the distribution of numbers chosen to be more equal?

A solution that I though of would just be to create an array from 1-40 items and just shuffle the array and return the first element, but I figured I’d run into the same problem.
I’m also aware that I set the seed value in my trialHandler in the next line but I don’t believe that is the issue because it follows the Math.random() command.

Thanks for any input.

My code:

//read in stimuli
  valence_semantic_lists = new TrialHandler({
          psychoJS: psychoJS,
          trialList: 'valence_semantic_lists.csv',
          nReps: 1,
          method: TrialHandler.Method.SEQUENTIAL,
          extraInfo: expInfo,
          seed: 2,
          name: 'valence_semantic_lists'

I once ran a test of our shuffle function that generates 60,000 random values ranging 1 to 6, and uses binomial tests to see how evenly the values are distributed. Didn’t find any issues then. See:

We don’t have this code yet in our cross-browser unit-tests, but I’m inclined to assume the random function will work fine on all platforms. Maybe try a test like the one I reference above, but with a larger number of observations?