fix nil pointer err
Merge pull request #2 from jarcoal/patch-1

fix nil pointer err