fix segfault in -Dx without threads