fix multithreaded tests