Some bag fixes after refactoring