Possible memoryleak fix