Ensure that index matches scope
Merge pull request #34 from joeyAghion/scoped_index

Ensure that index matches scope [Fixes #33]