Fix bug multithread