trying to fix Segfault in start threads