Attempting to fix scoping issues.