Corrected segfault
Merge pull request #70 from petersohn/master

Corrected segfault