Autocomplete fixes (should be improved)