More scoping fixes.