fixups for threaded builds