Fix not enough readable bytes bug.