Fixed a NPE
Merge pull request #104 from modmuss50/master

Fixed a NPE