fix random shuffle bug