fixed memoryleak, ruined performance