Fixed scoping bug.