Slight multithreading changes