Fixed leaked for loop i

Ref issue #21
Merge pull request #23 from jason-brodie-codebaby/patch-1

Fixed leaked for loop i