Fix the bug that UI cannot take effect at once after clear history
record