found and fixed large memory leak bug