Fixes potential memory leak
Merge pull request #19 from jkoepcke/patch-1

Fixes potential memory leak