bugfix from Pq to Pg