removed a memory leak