fix js error