fix a small memory leak