solving pg issues