threads no longer segfault