fixed the error in jscript for estimator