                 return
             }
             if !text.isEmpty {
-                let typed = text[text.startIndex..<text.characters.index(text.endIndex, offsetBy: -self.parkedText.characters.count)]
+                let typed = text[text.startIndex..<text.index(text.endIndex, offsetBy: -self.parkedText.count)]
                 text = typed + newValue
                 
                 prevText =  text

    
    var beginningOfParkedText: UITextPosition? {
        get {
            return position(from: endOfDocument, offset: -parkedText.characters.count)
        }
    }
    

        didSet {
            if let placeholder = placeholder {
                let attributedString = NSMutableAttributedString(string: placeholder)
                let parkedTextRange = NSMakeRange(placeholderText.count, parkedText.count)
                if placeholder.hasSuffix(parkedText) {
                    attributedString.addAttributes(parkedTextAttributes, range: parkedTextRange)
                    attributedPlaceholder = attributedString
