Fix Issue With Random Number Being Outside Bounds

This PR fixes an issue where a random number can be generated which is outside of the bounds of the `char` array. This way when a value is outside of the bounds of the array it is roped back into the valid bounds using the modulus function.