     let titleLabel = getTitleLabel(title: issueData.title)
     if let titleLabel = titleLabel {
       let unbracketedTitleLabel = String(titleLabel.dropFirst().dropLast())
-      for name in componentNames {
-        if name.lowercased() == name {
-          continue
-        }
-        if unbracketedTitleLabel == name {
-          labelsToAdd.append(titleLabel)
-          break
-        } else if checkIfTwoStringsAreSimilar(str1: name,
-                                              str2: unbracketedTitleLabel,
-                                              threshold: 2) {
-          let bracketedName = "[" + name + "]"
-          labelsToAdd.append(bracketedName)
-
+      // Check if title label is a component name
+      if componentNames.contains(unbracketedTitleLabel) {
+        labelsToAdd.append(titleLabel)
+      } else {
+        // Check if it's close to a component name, and then fix it
+        var labelDist = [String: Int]()
+        for name in componentNames {
+          // This isn't a component folder, continue
+          if name.lowercased() == name {
+            continue
+          }
+          labelDist[name] = getStringDistance(str1: name.lowercased(),
+                                              str2: unbracketedTitleLabel.lowercased())
+        }
+        // get minimum distance
+        let (lbl, dist) = labelDist.reduce(("", Int.max)) { $0.1 > $1.value ? ($1.key, $1.value) : $0 }
+        if dist <= 2 {
+          let bracketedLabel = "[" + lbl + "]"
+          labelsToAdd.append(bracketedLabel)
           // update title
           if let range = issueData.title.range(of: "]") {
             let titleWithoutLabel = issueData.title[range.upperBound...]
-            var updatedTitle = bracketedName
+            var updatedTitle = bracketedLabel
             if titleWithoutLabel.first != " " {
               updatedTitle += " " + titleWithoutLabel
             } else {

            GithubAPI.editIssue(url: PRData.issue_url, issueEdit: ["title": updatedTitle])
            // notify of title change
            GithubAPI.createComment(url: PRData.issue_url,
                                    comment: "Your title label prefix has been renamed from \(titleLabel) to \(label).")
          }
          break
        }
      }
    } else if labelsFromPaths.count == 1, let label = labelsFromPaths.first {

    }
    labelsToAdd.append(contentsOf: labelsFromPaths)
    if let titleLabel = getTitleLabel(title: PRData.title) {
      // The label in the title isn't part of the changed componentry
      if !labelsFromPaths.contains(titleLabel) {
        // Check if it's close to a component name, and then fix it
        var labelDist = [String: Int]()
        let unbracketedTitleLabel = String(titleLabel.dropFirst().dropLast())
        for label in labelsFromPaths {
          let unbracketedLabel = String(label.dropFirst().dropLast())
          labelDist[label] = getStringDistance(str1: unbracketedLabel.lowercased(),
                                              str2: unbracketedTitleLabel.lowercased())
        }
        // get minimum distance
        let (lbl, dist) = labelDist.reduce(("", Int.max)) { $0.1 > $1.value ? ($1.key, $1.value) : $0 }
        if dist <= 2 {
          labelsToAdd.append(lbl)
          // update title
          if let range = PRData.title.range(of: "]") {
            let titleWithoutLabel = PRData.title[range.upperBound...]
            var updatedTitle = lbl
            if titleWithoutLabel.first != " " {
              updatedTitle += " " + titleWithoutLabel
            } else {
