fixed some garbage not being collected