Fix NPE
Merge pull request #43 from xschildw/release-1.7

Fix NPE