- fix issue #4 memory leaks