Fix possible js error