 						
 						newSegment += String(char)
 						
-						if charIndex == segment.characters.count - 1 {
+						if charIndex == segment.count - 1 {
 							skipNextNewLineReplacement = true
 						}
 						

	public func CMTime(fromFCPXMLTime timeString: String) -> CMTime {
		var timeValues = timeString.components(separatedBy: "/")
		if timeValues.count > 1 {
			timeValues[1] = String(timeValues[1].characters.dropLast())
			let value = Int64(timeValues[0])!
			let timescale = Int32(timeValues[1])!
			
			return CMTimeMake(value, timescale)
		} else {
			timeValues[0] = String(timeValues[0].characters.dropLast())
			let value = Int64(timeValues[0])!
			
			return CMTimeMake(value, 1)
		}
	}
	

			var newSegment = ""
			var reachedAttributeEnd = false
			
			for (charIndex, char) in segment.enumerated() {
				
				if reachedAttributeEnd == false {
					
