Tighten types a bit. No functionality change.