Finish 'Undo' function