Fix for a variable that may not be defined under certain circumstances.
Merge pull request #1 from possum888/master

Fix for a variable that under certain circumstances may be undefined.