fix memory leak in the pkuxkx package