1881: fix the null pointer error
Merge pull request #348 from datadryad/atmire-1881-2

1881: fix the null pointer error