another memory corruption bug fixed?
removed segfaults
Merge pull request #9 from zgao/master

SEGAIFNAEOFUNE