..autocomplete: fixing the cherry picked changes

Change-Id: Ic91bd9c939d73068600ed826c273580f88c2e021