Fixed a scoping bug.