Make history-saving work right.