fix for query by client id