Fix off-by-one at the end of the range.

  This closes #2.