Attempt to get scoping right.