Fixed issue when read messages were being marked as unread.