another memory leak fix