fix: fix memory leak