Fix wrong except IndexError -> StopIteration
Merge pull request #231 from naufraghi/patch-1

Fix wrong except IndexError -> StopIteration