Use correct scope for variable

Authored by apol on May 3 2016, 12:30 AM.