resolve js error