Fix pg issue