default total to 0 in buffered collection instead of undefined