Fix crash bug
Merge pull request #18 from zichuanwang/master

Fix crash bug