fixed bug (repetition in returned objects)

fixed bug (equal objects could be returned twice or more, now they're unique),
decreased db traffic (does not fetch all objects anymore)