bag fixes
add some tests