Fixed database not using correct database name