 	
 	func testMeasureAtIndexForRegularMeasure() {
 		do {
-			let measure = try staff.measureAtIndex(1) as! Measure
-			XCTAssertEqual(measure, staff.notesHolders[1] as? Measure)
+			let measure = try staff.measureAtIndex(1)
+			XCTAssertEqual(measure as? Measure, staff.notesHolders[1] as? Measure)
 		} catch {
 			XCTFail(String(error))
 		}

			try staff.removeTieFromNoteAtIndex(firstNoteIndex, inMeasureAtIndex: firstMeasureIndex + 1)
			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)
		} catch {

			let firstNoteIndex = 3
			let firstMeasureIndex = 7
			try staff.startTieFromNoteAtIndex(firstNoteIndex, inMeasureAtIndex: firstMeasureIndex)
			let measureRepeat = staff.notesHolders[6] as! MeasureRepeat
			let firstMeasure = measureRepeat.measures[0]
			let secondMeasure = measureRepeat.measures[1]
			let firstNote = firstMeasure.notes[firstNoteIndex] as! Note
