fixed bug when using rand