Fix object search: compare uid instead object reference
minor refac