small memory leak fix