fix mem leaks in DNA