Fixes high file system usage when disabling history.