fixed NPE
Merge pull request #6 from atomota/master

fixed NPE