fix multithreading bug