a possible fix for an NPE
fix for issue #134
Merge pull request #143 from menny/master

v101 changes