Fix for exception due to not defined variables
Merge pull request #79 from dave0783/master

Fix for exception due to not defined variables