fix incorrect unread condition checking