[fix] rand number generator for 1.8.7