fixed minor memoryleak