fix in memory leaks