Local data multithread working (bugfixed)