Fixed null pointer exception.
Merge pull request #621 from anilgooru/dev-branch

Fixed null pointer exception.