Fixing ctrl-a and a bug with undo-tree