         }
         
         if holdMode {
-            if keysHeld.contains(key) {
+            if midiNotesHeld.contains(midiNoteFromTag(key.tag)) {
                 turnOffKey(key)
                 return
             }

    }
    
    func toggleKeyHeld(key: UIButton) {
        if let i = keysHeld.indexOf(key) {
            keysHeld.removeAtIndex(i)
            if let i2 = midiNotesHeld.indexOf(midiNoteFromTag(key.tag)) {
                midiNotesHeld.removeAtIndex(i2)
            }
        } else {
            keysHeld.append(key)
            midiNotesHeld.append(midiNoteFromTag(key.tag))
        }
    }
    
    func toggleMonoKeyHeld(key: UIButton) {
        if !keysHeld.contains(key) {
            keysHeld.removeAll()
            keysHeld.append(key)
         
        } else {
            keysHeld.removeAll()
            midiNotesHeld.removeAll()
        }
    }

        }
    
        statusLabel.text = "Key(s) Released"
        midiNotesHeld.removeAll(keepCapacity: false)
    }
    
    func updateAllKeysToUpPosition() {
        // Key up all keys shown on display
        for tag in 248...272 {
            guard let key = self.view.viewWithTag(tag) as? UIButton else {
                return
