fix pg stuff