Fix length computation for TXT