Bug #1370666

Handle undefined error
Merge pull request #101 from surakula/master

Bug #1370666