fix out of scope variable
Merge pull request #184 from teharrison/master

fix out of scope variable