fix bug with unread group display (+ code simplification)