fix read/unread bugs