Fix reference to database in db.stats()