Merge pull request #278 from mrocklin/sort-fix

Sort fix
add nunique operation