fix typo for query