fix a null internal_classes bug of CoffeeBag