Correcting an error with the index