Fix compilation failure

Fix failure of compilation caused by referring to an inaccessible local variable.
Resolve compilation issue

Actually resolve the compilation issue instead of just wallpapering over it.
Merge pull request #49 from bculkin2442/1.7-update

Resolve compilation issue