a few minor adjustments to previous cpquery commit