Fixed bug with incorrect referece to database name