fixed random seed bug