fix #361 for autocomplete freetext

Closes #362.