fix for query_by_address and query_by_client id