fix logic on bad reading rejection code