Fixed NPE
Merge pull request #184 from squix78/DevBranch

Fixed NPE