Fixing history autocomplete