Fix sorting behavior for items at end of a list (fixes #27)
Merge pull request #28 from sharwell/fix-27

Fix sorting behavior for items at end of a list