fix an off-by-one bug for the peek buffer.  Would have overrun the end of the buffer, potentially damaging the peekhead value