fix to js error