Fixed js error