Fix pg wait and URL from API