Fixed remaining postgresql connection issues.