fixed a small memory leak