Bugfix: more robust selection
Merge pull request #3 from TheBB/index

Bugfix: more robust selection