undo stack starting to behave more sensibly