fix the error cannot find indexof