Problems picking the right object

I try to pick objects using the glSelectBuffer and the glPickMatrix.
I get the correct number of hits using glRenderMode(GL_RENDER).
Then I try to get from the buffer the object name that is closer to the camera.
but I cannot understand the way data is passed into the buffer.
e.g. once I click on three objects I get somthing like
and another time something like

How should I read the buffer?
Is there another ,easier or faster, way to get the selected object name?

Maybe it’s due to you pushing names.
There is no need to do this.
Push name only once at start, then just glLoadName.