             let keyCode = CGKeyCode(event.getIntegerValueField(.keyboardEventKeycode))
             
             if modifierMasks[keyCode] == nil {
-                return Unmanaged.passRetained(event)
+                return Unmanaged.passUnretained(event)
             }
             return event.flags.rawValue & modifierMasks[keyCode]!.rawValue != 0 ?
                 modifierKeyDown(event) : modifierKeyUp(event)

        default:
            self.keyCode = nil
            
            return Unmanaged.passRetained(event)
        }
    }
    

    
    func eventCallback(proxy: CGEventTapProxy, type: CGEventType, event: CGEvent) -> Unmanaged<CGEvent>? {
        if isExclusionApp {
            return Unmanaged.passUnretained(event)
        }
        
        if let mediaKeyEvent = MediaKeyEvent(event) {
