fix tag sorting issue