dirty: fix memory leak