Cleanup for history comparison.