Fixed checking of unread messages for CSS class.