     
     internal func didDisconnect() {
         peripheral.delegate = nil
-        ledMatrixCharacteristic = nil
+        matrixCharacteristic = nil
         delegate?.nuimoControllerDidDisconnect?(self)
     }
     

    }
    
    private func writeMatrixNow(matrix: String?) {
        assert(!isWaitingForLedMatrixWriteResponse, "Cannot write matrix now, response from previous write request not yet received")
        guard let ledMatrixCharacteristic = ledMatrixCharacteristic else { return }
        
        // Convert matrix string representation into byte representation
        let matrixBytes = NuimoLEDMatrix.matrixBytesForString(matrix ?? "")

    
    private let peripheral: CBPeripheral
    private let centralManager: CBCentralManager
    private var matrixCharacteristic: CBCharacteristic?
    private var currentMatrix: String?
    private var lastWriteMatrixDate: NSDate?
    private var isWaitingForMatrixWriteResponse: Bool = false
    private var writeMatrixOnWriteResponseReceived: Bool = false
    private var writeMatrixResponseTimeoutTimer: NSTimer?
    
