fixed gc bug