Important memory leak bug fixed