Improved tag sorting.