fix query phrase bug