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

Fixed nullpointer expection