Fix for "undefined is not a function" problem
Merge pull request #176 from gnarf/bug-fix

Fix for "undefined is not a function" problem