fix for ndb queries