reduce range by 1 to fix potential off-by-1 error

This accounts for counting from 0 in the range, as `inters` is generated from a `length` call which counts from 1. This should fix #9