Make sure we keep our points within the bounds of the range

Fixes #2