Fix duplicate solutions.