Fix bug where autocomplete wasn't being saved correctly.