fixes and 1-based index search
Merge pull request #16 from b0nk/master

fixes and 1-based index search