fix bugs in ts_proj.js and ts_proj_new.js