fixing nullpointer
Merge pull request #45 from novikam/master

fixing nullpointer