fix memory lost in slave proxy mode