Use sort -u instead of uniq