fix pg setup bug