Fix a off-by-one bug.

Pointy hat to:	loos