undo changes to index