segfault fix
Merge pull request #58 from LukasSukenik/master

segfault fix