memory leak fix part III