Attempt to fix thread::join