Fixed a weird off-by-one issue.