Fixed NullPointerException
Merge pull request #398 from Junkern/issue#363

Fixed NullPointerException