Fixed an undefined variable.
Merge pull request #246 from BenMorel/varfix

Undefined variable fix