Working on memory leak