             // Add all our ranges to the result
             for match in matches {
                 let matchRange = match.range
-                let stringIndexRange = text.startIndex.advancedBy(matchRange.location)..<text.startIndex.advancedBy(matchRange.location + matchRange.length)
-                let matchString = text.substringWithRange(stringIndexRange)
+                let matchString = NSString(string: text).substringWithRange(matchRange)
                 
-                rangesForLinkType.append(LinkRangeResult(linkDetectionType: linkType, linkRange: stringIndexRange, linkString: matchString, textLink: nil))
+                rangesForLinkType.append(LinkRangeResult(linkDetectionType: linkType, linkRange: matchRange, linkString: matchString, textLink: nil))
             }
         }
 

        if characterIndex <= textStorage?.length {
            if let linkRangeResults = contextLabelData?.linkRangeResults {
                for linkRangeResult in linkRangeResults {
                    let rangeLocation = text.startIndex.distanceTo(linkRangeResult.linkRange.startIndex)
                    let rangeLength = linkRangeResult.linkRange.startIndex.distanceTo(linkRangeResult.linkRange.endIndex)
                    
                    if rangeLocation <= characterIndex &&
                        (rangeLocation + rangeLength - 1) >= characterIndex {

            }
            
            if let attributes = attributes {
                mutableAttributedString.setAttributes(attributes, range: linkRangeResult.linkRange)
            }
        }
        
