Do distinct correctly