PDF content editing - Propagation of graphics state changes.

Q: We have a PDF file, and our objective is to change the stroke
color of all the ovals (path objects) in the file. But for some reason
when we do that the path items and also the rectangles around the
ovals(path) are also getting filled with the same color –
The code we used is as follows –

       if (pElement.GetType() == Element.Type.e_path) {
       GState gstate = pElement.GetGState();
       gstate.SetStrokeColorSpace(ColorSpace.CreateDeviceRGB());
       gstate.SetStrokeColor(new ColorPt(1, 0, 0)); //red
       }

Can you please have a look at the attached file, and help us diagnose
the problem with it?
-----------------------

A: What is the version of PDFNet that you are using on your end? In
version prior to v.5.5 a change in the graphics state would propagate
to subsequent elements (until the property would be changed again or
until the graphics state would be restored). Starting with v.5.5
(http://www.pdftron.com/pdfnet/downloads.html), changes in the
graphics state are not propagated to subsequent elements (to simplify
work with most PDF). This means that if you want to change a property
on a specific element you no longer need to restore the attribute to a
previous value to prevent change propagation on other elements.