Slight multithreading optimizations.