don't leak memory
Merge pull request #14 from monsta/patch-1

Fix some leaks