 			try staff.startTieFromNoteAtIndex(firstNoteIndex, inMeasureAtIndex: firstMeasureIndex)
 			try staff.removeTieFromNoteAtIndex(firstNoteIndex, inMeasureAtIndex: firstMeasureIndex)
 			let measure = staff.notesHolders[firstMeasureIndex] as! Measure
-			let firstNote = measure.notes[firstNoteIndex] as! Note
-			let secondNote = measure.notes[firstNoteIndex + 1] as! Note
+			let firstNote = (measure.notes[0] as! Tuplet).notes[firstNoteIndex]
+			let secondNote = measure.notes[1] as! Note
 			XCTAssertNil(firstNote.tie)
 			XCTAssertNil(secondNote.tie)
 		} catch {

			try staff.removeTieFromNoteAtIndex(firstNoteIndex, inMeasureAtIndex: firstMeasureIndex)
			let measure1 = staff.notesHolders[firstMeasureIndex] as! Measure
			let measure2 = staff.notesHolders[firstMeasureIndex + 1] as! Measure
			let firstNote = measure1.notes[firstNoteIndex] as! Note
			let secondNote = measure2.notes[0] as! Note
			XCTAssertNil(firstNote.tie)
			XCTAssertNil(secondNote.tie)

	
	func testMeasureAtIndexForMeasureThatRepeats() {
		do {
			let measureThatRepeats = try staff.measureAtIndex(5)
			let measureRepeat = staff.notesHolders[5] as! MeasureRepeat
			XCTAssertEqual(measureThatRepeats as? RepeatedMeasure, measureRepeat.expand()[0] as? RepeatedMeasure)
		} catch {
			XCTFail(String(error))
		}
