fix connection issues to postgres db