owningquery fix