- fix a bug in ts input.