Fixing TS errors