Fix #361 for autocomplete freetext