fixing error with autocomplete not placed in right position