Fix database connection issues.