bug: total messages counting fix