Cut down on potential NPEs.
Merge pull request #7 from erocs/master

Changes