Random Generation Fixed

Random generation bug fixed in a better way. Only GetRandomNumber()
Method changed.