Bugfix: It is simpler and less prone to error to set the name on the pg object.