fix pointer js error