More compatibility fixes with TS 0.9.1