Yet another off-by-one error dealt with.