[#46] Fix for NullPointerException
Merge pull request #47 from alberskib/iss46

[#46] Fix for NullPointerException - fixes #46