Another try to fix the SEGV of issue #44

Maybe this one is better