fix bug on query parser