further fix ts bug