assertions, available_capacity returns 0 if closed