brokers bugfix on query