fix bug when query is None