Fixing issue that not all the element info was grabbed

It seemed that we are dealing with more than one fid when gathering all
the page details since each page can have different elements.

The function now acts with this in mind.