fixed memoryleak