Fix paste undo, segment delete undo, setValue undo