fix querying