fixed slight error when calculating random numbers