shuffle logic fix