Update pg.py

A minor change