Prevent overflow of text in autocomplete