Memoryleak fix #2