Fixing TS references