try ti fix memleaks.