Updated for issue 46
Merge pull request #71 from fanjizhao/master

Upated for issue 46