Off-by-one error. Fixes #228.