Fix for tag sorting