changes needed for activerel

Just trying to sneak these in with your merge into master. I have a few more adjustments that prevent some duplicate queries that are still broken, I can fix them later.