Presever order in uniq and use the first uniq value in uniq by

Fixes #118