correct js error