Restore python2 sorting