fix decodeToString error for autocomplete, see #577