replace calls to PG_FLAGS with calls to $main::PG->{flags} This will work for now at least.
Changed paths: