tta: fix off be 1 error in the end detection.