fix random seed bug