fixing pg issues