Fix range to be idempotent

Closes #52 and should allow for PR #57 start to pass.