Fixed another tuple index out of range

Another tuple index out of range, the same modification that I did in #7
Merge pull request #8 from dgilm/patch-2

Fix : tuple index out of range