fixed multithreading bug? I hope...