fix indexOf and lastIndexOf

fix indexOf and lastIndexOf