fixed issue 24

issue 24 caused by get element by slicing
to avoid out of bound
Use catch indexError instead
Merge pull request #80 from yodalee/issue24

fixed issue 24