fix null ref
Merge pull request #1 from vans163/patch-1

fix null ref