Fixed index issue in indicesOf()