fixed mem leaks in tests
memory leak fixes in NOMSupport