fixed the remaining TS errors.