minor improvements to query times