fix bug in the undoredo example. The selection was not undone.