fix the off by one issues
Last few unaddressed pieces of feedback
Merge branch 'off-by-one-twice'