fixed bug in rand-sample