fixing shuffle bug