Fixed an exception when calling rand.i with the same values for a and b.