corrected multithreaded pb when debugging