Fix database db_class accessor and database create