fix nil variable reference.
Merge pull request #363 from axsh/fix-issue-362

fix nil variable reference.