LPS-31965 fix bug in QueryDefinition