Fixes to querys in ObjectService