Fixed nullpointer expection
Merge pull request #471 from sheebans/master

Fixed nullpointer expectation