Fix TS compile error