fix autocomplete and history