fix potential crashes on KKAPIRequest and KKEventQueue