fixed memleaks, see #32