fix testInstanceRand()