Improve behavior around threading.