fix memory leaks bug