fix memory leak
Merge pull request #12 from FelixZhang/small-fix

fix memory leak