fixing memleak

Fixes #9