fixing NullPointerException
Merge pull request #52 from novikam/master

fixing NullPointerException