fix js error issue