fix scope var i
Merge pull request #3 from nickyspag/master

fix scope var i