fixed erroneous scope change