Changed shuffle to in-place shuffle.