Fix `rand` problem in multi-threaded env