fixing pg bug
debugging