Fix solver's shuffle algorithm