Fix NPE
Merge pull request #1 from turt2live/master

Fix NPE