Fix gc sql part 2.