fix memory leaking
fix memory leaking