Fix database connection.