Fix for dreaded threaded builds