Fix the scope problem for displaying the database name.