Fix NPE
Merge pull request #293 from mironov-nsk/npe

Fix NPE