timeout multithreading bugfix