Fixed tgi offest bug.