Fixed bug causing Random to occasionally return values out of range