Fix scoping issues.