More thread tweaks.