Fix sort issue with tags.