corrected use of out-of-scope variable.