Swap uniq and collect