Fix NPE

Everything else is perfect
Merge pull request #232 from lDiverse/patch-100

Fix NPE