More memory leak fix