Master fix memory leak