Bugfix (eliminating some null undo history records)