Undo.setMax() specs and fixes