fix unread check logic.