some TS fixes