fixed bug: query word encode