Fixed segfault
Merge pull request #92 from mannol1/master

Fixed segfault