#17 fix a memory leak