Fix documentation on index function