Fixed possible null pointer exception
Merge pull request #7 from tschneid/master

Fixed possible null pointer exception