             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)

        
        self.keyCode = nil
        
        return Unmanaged.passRetained(event)
    }
    
    func mediaKeyDown(_ mediaKeyEvent: MediaKeyEvent) -> Unmanaged<CGEvent>? {

            return nil
        }
        
        return Unmanaged.passUnretained(mediaKeyEvent.event)
    }
    
    func getConvertedEvent(_ event: CGEvent, keyCode: CGKeyCode? = nil, keyDown: Bool = false) -> CGEvent? {
