memoryleak fix