fix a bug for parseQuery func