fix autocomplete histories