Fixed minor bug in RNG API