fix the I32 bug for index() and rindex()