Fix segfault
Merge pull request #52 from alex55i/master

Really fix segfault on linux