remove mem leaks